package com.sk.bilibili.view.diy.bottomDialog;

import android.view.View;

import androidx.fragment.app.FragmentManager;

import com.sk.bilibili.R;
import com.sk.bilibili.model.diy.bottomDialog.FollowModel;
import com.sk.bilibili.model.diy.bottomDialog.ThemModel;

public class FollowBottomDialog extends BaseBottomDialog<FollowModel>
        implements View.OnClickListener{

    private Integer followThemId;

    public void show(FragmentManager fragmentManager,Integer followThemId) {
        super.show(fragmentManager);
        this.followThemId=followThemId;
    }

    @Override
    public int getLayoutRes() {
        return R.layout.bottom_dialog_follow;
    }

    @Override
    protected int[] getClickIds() {
        return new int[]{R.id.rb_0,R.id.rb_1,R.id.rb_2,R.id.rb_3,R.id.tv_cancel};
    }

    @Override
    protected void onClick(int id) {
        switch (id){
            case R.id.rb_0:
                model.changeState(followThemId,2);
                break;
            case R.id.rb_1:
                model.changeState(followThemId,1);
                break;
            case R.id.rb_2:
                model.changeState(followThemId,0);
                break;
            case R.id.rb_3:
                model.changeState(followThemId,null);
                break;
        }
        dismiss();
    }

    public void changeSuccess() {
        toast("操作成功");
    }

}